﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Data;
using OgilvyOne.Model;
using OgilvyOne.Utility;

namespace OgilvyOne.IDAL
{
    public interface ICmsArticleFront
    {
        /// <summary>
        /// 获取单篇文章
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        CmsArticleModel getCmsArticle(int aid);
        /// <summary>
        /// 删除文章
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool Del(string ids);
        /// <summary>
        /// 发布文章到前台
        /// </summary>
        /// <param name="cm"></param>
        /// <returns></returns>
        bool PushFront(CmsArticleModel cm);

        DataSet GetSqlTable(string sql);

        /// <summary>
        /// 文章视频列表
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        IList GetVideos(int aid);
        /// <summary>
        /// 文章类型图片
        /// </summary>
        /// <param name="aid"></param>
        /// <param name="imgtype"></param>
        /// <returns></returns>
        IList GetImgs(int aid, int imgtype);
        /// <summary>
        /// 文章列表 按修改时间倒序
        /// </summary>
        /// <param name="cid">栏目ID</param>
        /// <param name="rows">列表数量 0 所有</param>
        /// <returns></returns>
        IList GetArticleList(int cid, int rows);
        /// <summary>
        /// 美味人生（下部分）文章查询
        /// </summary>
        /// <returns></returns>
        IList GetHealthArticleList(int cid, int rows);
        /// <summary>
        /// 美味厨房列表页热点查询
        /// </summary>
        /// <returns></returns>
        IList GetHealthArticleLists(int cid, int rows);
        /// <summary>
        /// 文章列表 按排序号正序
        /// </summary>
        /// <param name="cid"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        IList GetArticleOrderList(int cid, int rows);
        DataSet GetArticleDataSet(int cid, int rows);
        DataSet GetArticleOrderDataSet(int cid, int rows);
        /// <summary>
        /// 栏目置顶列表，修改日期排序
        /// </summary>
        /// <param name="cid"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        IList GetColumnTopArticleList(int cid, int rows);
        /// <summary>
        /// 获取联系信息
        /// </summary>
        /// <returns></returns>
        IList GetContactInformation(int aid);
        /// <summary>
        /// 首页置顶列表，修改日期排序
        /// </summary>
        /// <param name="cid"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        IList GetHomeTopArticleList(int cid, int rows);
        /// <summary>
        /// 文章分页列表
        /// </summary>
        /// <param name="cid">栏目ID</param>
        /// <param name="pageon">页码</param>
        /// <param name="pagesize">页大小</param>
        /// <returns></returns>
        PageTools GetArticlePageList(int cid, int pageon, int pagesize);
        /// <summary>
        /// 查询文章分页列表
        /// </summary>
        /// <param name="qmodel">查询条件</param>
        /// <param name="pageon"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        PageTools GetArticlePageList(CmsArticleQuery qmodel, int pageon, int pagesize);
        /// <summary>
        /// 热点收藏文章分页列表
        /// </summary>
        /// <param name="layerid">栏目Layerid</param>
        /// <param name="pageno">当前页</param>
        /// <param name="pagesize">页大小</param>
        /// <returns></returns>
        PageTools GetCollsArticlePageList(string layerid, int pageno, int pagesize);
        PageTools GetCollsArticlePageList(string layerid, int pageno, int pagesize, int lid);
        /// <summary>
        /// 栏目热点收藏
        /// </summary>
        /// <param name="layerid"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        IList GetCollsArtticleList(string layerid, int rows);
        /// <summary>
        /// 文章标签列表
        /// </summary>
        /// <param name="tids"></param>
        /// <returns></returns>
        IList GetArticleTags(string tids);
        /// <summary>
        /// 营养专家列表
        /// </summary>
        /// <returns></returns>
        IList GetHealth(string where);
        /// <summary>
        /// 专家文章列表
        /// </summary>
        /// <returns></returns>
        IList GetHealthArticle(int expid);
        /// <summary>
        /// 当前栏目人气文章列表
        /// </summary>
        /// <returns></returns>
        IList GetHealthArticleTop(int cid, int rows);
        /// <summary>
        /// 健康学院首页热门收藏文章列表
        /// </summary>
        /// <returns></returns>
        IList GetHealthArticleTop(string layerid, int top);
        /// <summary>
        /// 新闻年月汇总
        /// </summary>
        /// <param name="cid"></param>
        /// <returns></returns>
        Hashtable GetArticleGroupYear(int cid);
        /// <summary>
        /// 食谱内容页-相关食谱列表
        /// </summary>
        /// <returns></returns>
        IList GetRecipeArticle(string where,int cid);
        /// <summary>
        /// 新闻列表
        /// </summary>
        /// <returns></returns>
        IList GetNewsList(int cid, int year, int month);
        /// <summary>
        /// 所有层级栏目文章列表
        /// </summary>
        /// <param name="layerid"></param>
        /// <param name="row"></param>
        /// <returns></returns>
        IList GetLayerArticleList(string layerid, int row);
        /// <summary>
        /// 文章更多信息
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        CmsArticleMore GetArticleMore(int aid);

        Hashtable GetColumnGroupYear(int cid);
        /// <summary>
        /// 层级首页置顶列表
        /// </summary>
        /// <param name="layerid"></param>
        /// <param name="row"></param>
        /// <returns></returns>
        IList GetHoemLayerArticleList(string layerid, int row);
        /// <summary>
        /// 增加阅读数
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        bool addHits(int aid);
        /// <summary>
        /// 增加收藏
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        bool addColls(int aid);
        int GetArticleHits(int aid);
        int GetArticleColls(int aid);

        ///// <summary>
        ///// 相关业务查询
        ///// </summary>
        ///// <param name="aid"></param>
        ///// <returns></returns>
        //CmsArticleModel GetSubsidiary(int aid);

        /// <summary>
        /// 关联联系信息列表
        /// </summary>
        /// <param name="aids"></param>
        /// <returns></returns>
        IList GetConcacts(string aids);
        /// <summary>
        /// 相关单位查询
        /// </summary>
        /// <returns></returns>
        IList GetSubsidiary(int aid);
        /// <summary>
        /// 业务品牌
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        //List<BrandInfoModel> GetBusBrands(int aid);

        IList GetVideoArticleList(int cid, int row);

        /// <summary>
        /// 今日热点列表和分页 2012-4-24 李学明 add
        /// </summary>
        /// <param name="columnid"></param>
        /// <param name="pageno"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        PageTools GetHotspotPageList(int columnid, int pageno, int pagesize);
    }
}
